1. Field of the Invention
The present invention relates to a bar code reader which records a two-dimensional bar code by means of an imaging element and reads bar code information from the recorded bar code image.
"Code 16K", "Code 49", "PDF 417", "Data Code", etc. are known and in actual use as two-dimensional bar codes in which information is recorded in two-dimensional directions.
In general, a two-dimensional bar code is read by two methods. In one of the methods, the two-dimensional bar code is scanned with a laser beam in a predetermined pattern, and bar code information is read based on the intensity of reflected light from the bar code. In the other method, the two-dimensional bar code is recorded by means of an imaging element, such as a CCD (Charge Coupled Device), and the bar code image stored in a frame memory is electrically scanned or processed based on a software program to read out bar code information from the bar code.
FIG. 6A shows a schematic structure of a prior art image formation optical system incorporated in a bar code reader which employs an imaging element to read bar code information from a two-dimensional bar code.
The prior art image formation optical system comprises an image-formation lens 12 and an imaging element 14 (e.g., a CCD). The image-formation lens 12 is part of a TV camera, and this TV camera is supported by means of a supporting post such that it is located above an object on which a two-dimensional bar code 10 is printed or a bar code label showing the two-dimensional bar code 10 is adhered. The two-dimensional bar code 10 is located to cross an optical axis 16 of the image-formation lens 12 and imaging element 14.
Lighting means 18 for lighting the two-dimensional bar code 10 surrounds the image-formation lens 12.
In the prior art bar code reader mentioned above, the two-dimensional bar code 10 must be arranged substantially perpendicular to the optical axis 16 because of an adoption of a scan sampling method described later. FIG. 6B shows a plan view of a rectangular outline of the two-dimensional bar code 10 arranged substantially perpendicular to the optical axis 16, and FIG. 6C shows and an outline of a two-dimensional bar code image 10' formed on the imaging element 14. As can be seen from FIGS. 6B and 6C, the rectangular outline of the two-dimensional bar code 10 arranged substantially perpendicular to the optical axis 16, and the outline of the two-dimensional bar code image 10' formed on the imaging element 14 are of the same shape though they are different in size due to the magnification of the image-formation lens 12.
FIG. 7 shows "PDF 417" as one example of the two-dimensional bar code 10. As is shown in FIG. 7, the two-dimensional bar code 10 comprises by a start code 10a, a stop code 10b, and a plurality of bar code rows (four bar code rows in FIG. 7) sandwiched between the start and stop codes 10a, 10b. The start code 10a and the stop code 10b are at the respective ends of the two-dimensional bar code 10 in its width direction (i.e., a scan direction indicated by the dash lines in FIG. 7). The bar code rows are adjacent to one another, and the codes of each bar code row extends in a height direction of the two-dimensional bar code 10 (i.e., in the direction perpendicular to the scan direction).
FIG. 8 shows the scan sampling method for scanning the image 10' formed by the above-mentioned prior art bar code reader. The two-dimensional bar code image 10' (FIG. 6C) formed on the imaging element 14 is temporarily stored in a frame memory (not shown). Then, the two-dimensional bar code image 10' is scanned along a plurality of parallel scan lines SCL.
In order for each of bar code rows to be scanned at least once, the scan lines SCL are spaced equidistantly in the height direction of the two-dimensional bar code image 10' such that the scan pitch SCP is shorter than 1/2 of a height H (FIG. 7) of each of the bar code rows.
In order that a minimum bar and minimum space can be sampled in each of the scan lines SCL, each of the bar code rows is sampled by the sampling pitch SAP shorter than 1/2 of the width W (FIG. 7) of the minimum space of each of the bar code rows along the each scan line SCL. That is, the two-dimensional bar code image 10' is sampled at intersections between the scan lines SCL and sampling lines SAL equidistantly spaced with the sampling pitch SAP in the scan direction (i.e., the width direction) of the two-dimensional bar code 10.
Based on brightness information at an intersection at which the two-dimensional bar code image 10' is sampled, it is determined whether that intersection is a part of the bars or spaces, which are included in the bar code row along which the scan line SCL corresponding to the intersection passes. From bar/space arrangement information obtained by this determination, bar code information corresponding to the two-dimensional bar code 10 is read out.
If, in the prior art bar code reader mentioned above, the two-dimensional bar code 10 on the object (not shown) is greatly slanted with reference to the optical axis 16 of the image-formation optical system, as is shown in FIG. 9A, an outline of the two-dimensional bar code image 10' (FIG. 9C) formed on the imaging element 14 is distorted and has a different shape from an outline of the two-dimensional bar code 10 (FIG. 9B).
In this case, the scan sampling method, wherein the scan lines SCL and the sampling lines SAL cross each other at right angles, cannot read out bar code information on the basis of predetermined combinations of the bars and spaces of all the bar code rows of the distorted two-dimensional bar code image 10' of FIG. 9C.